<?php

use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//
//Route::get('/', function () {
//    return Inertia::render('Welcome', [
//        'canLogin' => Route::has('login'),
//        'canRegister' => Route::has('register'),
//        'laravelVersion' => Application::VERSION,
//        'phpVersion' => PHP_VERSION,
//    ]);
//});

Route::get('/', function () {
    return Inertia::render('Auth/Login');
});

Route::middleware(['auth:sanctum', 'verified'])->group(function(){
    Route::get('/dashboard', '\App\Http\Controllers\OrderController@calendar' )->name('dashboard');

    Route::get('/customer','\App\Http\Controllers\CustomerController@index')->name('customer');
    Route::post('/customer','\App\Http\Controllers\CustomerController@update');
    Route::delete('/customer','\App\Http\Controllers\CustomerController@delete');

    Route::get('/rooms', '\App\Http\Controllers\RoomController@index')->name('rooms');
    Route::post('/rooms', '\App\Http\Controllers\RoomController@update');
    Route::delete('/rooms', '\App\Http\Controllers\RoomController@delete');

    Route::post('/rooms/group', '\App\Http\Controllers\RoomController@group');
    Route::delete('/rooms/group', '\App\Http\Controllers\RoomController@removeGroup');

    Route::get('/orders', '\App\Http\Controllers\OrderController@index')->name('orders');
    Route::post('/orders', '\App\Http\Controllers\OrderController@update');
    Route::post('/orders/status', '\App\Http\Controllers\OrderController@status');

    Route::delete('/orders', '\App\Http\Controllers\OrderController@delete');


});

